/*
 * Copyright 2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package be.free.ts.project.web;

import be.free.ts.project.ProjectService;
import be.free.ts.support.requestfactory.GuiceServiceLocator;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import java.util.List;

/**
 * @author Christophe De Blende
 * @since 02/01/13
 */

@Service(value = ProjectService.class, locator = GuiceServiceLocator.class)
public interface ProjectRequest extends RequestContext {

	Request<List<ProjectProxy>> findByCustomer(Long customerId);

	Request<ProjectProxy> save(ProjectProxy entity);

	Request<ProjectProxy> findOne(Long id);

	Request<Boolean> exists(Long id);

	Request<List<ProjectProxy>> findAll();

	Request<List<ProjectProxy>> save(List<ProjectProxy> entities);

	Request<List<ProjectProxy>> findAll(List<Long> ids);

	Request<Long> count();

	Request<Void> delete(Long id);

	Request<Void> delete(ProjectProxy entity);

	Request<Void> delete(List<ProjectProxy> entities);

	Request<Void> deleteAll();

	Request<ProjectProxy> saveAndFlush(ProjectProxy entity);

	Request<List<ProjectProxy>> findAll(int page, int size);

}
